﻿using System.Web.Mvc;

namespace BoneSystem.Extensions.Annotations.InputTypeAnnotations
{
    public class EMailAttribute : InputAttribute,IInputPathernAttribute,IInputLengthAttribute
    {
        public string Pathern { get; set; }
        public int MinLength { get; set; }
        public int MaxLength { get; set; }
        public string LengthErrorMessage { get; set; }

        public override TagBuilder TagBuilder()
        {
            var tag = base.TagBuilder();
            tag.Attributes["type"] = "email";
            
            return tag;
        }
    }
}
